home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / libg_261.zip / libg_261 / libg++ / etc / lf / directory.h < prev    next >
C/C++ Source or Header  |  1994-05-13  |  1KB  |  34 lines

  1. // This may look like C code, but it is really -*- C++ -*-
  2.  
  3. /* Manipulate all directory entries for all file classes. */
  4. #ifndef directory_h
  5. #define directory_h 1
  6. #include "entry.h"
  7.  
  8. class Directory_Handler
  9. {
  10. public:
  11.   /* There are five major types of files in the UNIX system. */
  12.   enum file_types
  13.     {
  14.       DIRS,                     /* Subdirectories. */
  15.       FILES,                    /* Regular files. */
  16.       EXECS,                    /* Executable files. */
  17.       DLINKS,                   /* Directory links (if -l option is enabled). */
  18.       FLINKS,                   /* File links (if -l option is enabled). */
  19.       LINKS,                    /* File *and* directory links (if -l option is *not* enabled). */
  20.       UNKNOWN_FILE,        /* E.g. Fifo */
  21.       MAX_TYPES
  22.     };
  23.  
  24.        Directory_Handler (void); /* Formats the current directory files. */
  25.   void print (void);             /* Lists the current directory files. */
  26.  
  27.  private:
  28.  
  29. /* static */ Entry_Handler file_class[MAX_TYPES]; /* File class array. */
  30.   static char          *class_name[MAX_TYPES]; /* String naem for each file class. */
  31.   
  32. };
  33. #endif
  34.